package com.jcl.traffic.security.config;

import lombok.RequiredArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author jcl_hqu
 * @date 2020/11/23 9:25
 */

@Configuration
@EnableConfigurationProperties
@RequiredArgsConstructor

public class WebMvcConfig extends WebMvcConfigurationSupport {
    @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry){
        registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
        registry.addResourceHandler("/test/**").addResourceLocations("classpath:/templates/");
        super.addResourceHandlers(registry);
    }
}
